//
//  main.m
//  OC01_work
//
//  Created by 侯平章 on 16/2/21.
//  Copyright © 2016年 侯平章. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Car.h"
#import "Student.h"
#import "Doctor.h"
#import "Teacher.h"
#import "Driver.h"
#import "Police.h"
#import "Programmer.h"
#import "Nurse.h"
#import "Worker.h"
#import "Musician.h"
#import "Artist.h"
#import "Writer.h"
#import "Composer.h"
#import "Actor.h"
#import "Cook.h"
#import "Repairman.h"
#import "Attorney.h"
#import "Mathematician.h"
int main(int argc, const char * argv[]) {
#if 0
    Car *car1 = [[Car alloc] init];
    Car *car2 = [[Car alloc] init];
    car1->_name = @"baoma2000";
    car1->_wieght = 1000;
    car1->_model = @"跑车";
    car1->_brand = @"baoma";
    car1->_speed = 120;
    car2->_name = @"benchi3000";
    car2->_wieght = 1000;
    car2->_model = @"商务";
    car2->_brand = @"benchi";
    car2->_speed = 100;
    [car1 run];
    [car2 run];
#endif
#if 0
    Student *stu1 = [[Student alloc] init];
    Student *stu2 = [[Student alloc] init];
    stu1->_name = @"张三";
    stu1->_sex = @"男";
    stu1->_age = 18;
    stu1->_weight = 100;
    stu1->_height = 180;
    stu2->_name = @"李四";
    stu2->_sex = @"女";
    stu2->_age = 18;
    stu2->_weight = 80;
    stu2->_height = 170;
    [stu1 sayHi];
    [stu2 sayHi];
#endif
#if 0
    Doctor *doctor1 = [[Doctor alloc] init];
    Doctor *doctor2 = [[Doctor alloc] init];
    doctor1->_name = @"张三";
    doctor1->_sex = @"男";
    doctor1->_age = 28;
    doctor1->_weight = 120;
    doctor1->_height = 182;
    doctor2->_name = @"李四";
    doctor2->_sex = @"女";
    doctor2->_age = 24;
    doctor2->_weight = 90;
    doctor2->_height = 168;
    [doctor1 sayHi];
    [doctor2 sayHi];
#endif
#if 0
    Teacher *tea1 = [[Teacher alloc] init];
    Teacher *tea2 = [[Teacher alloc] init];
    tea1->_name = @"张三";
    tea1->_sex = @"男";
    tea1->_weight = 100;
    tea1->_height = 178;
    tea1->_age = 25;
    tea2->_name = @"李四";
    tea2->_sex = @"女";
    tea2->_weight = 100;
    tea2->_height = 168;
    tea2->_age = 23;
    [tea1 sayHi];
    [tea2 sayHi];
#endif
#if 0
    Driver *driver1 = [[Driver alloc] init];
    Driver *driver2 = [[Driver alloc] init];
    driver1->_name = @"老司机";
    driver1->_sex = @"男";
    driver1->_weight = 100;
    driver1->_age = 30;
    driver1->_height = 180;
    driver2->_name = @"新司机";
    driver2->_sex = @"男";
    driver2->_weight = 120;
    driver2->_age = 20;
    driver2->_height = 170;
    [driver1 sayHi];
    [driver2 sayHi];
#endif
#if 0
    Police *police1 = [[Police alloc] init];
    Police *police2 = [[Police alloc] init];
    police1->_name = @"张三";
    police1->_sex = @"男";
    police1->_age = 28;
    police1->_weight = 120;
    police1->_height = 182;
    police2->_name = @"李四";
    police2->_sex = @"女";
    police2->_age = 24;
    police2->_weight = 90;
    police2->_height = 168;
    [police1 sayHi];
    [police2 sayHi];
#endif
#if 0
    Programmer *pro1 = [[Programmer alloc] init];
    Programmer *pro2 = [[Programmer alloc] init];
    pro1->_name = @"张三";
    pro1->_sex = @"男";
    pro1->_age = 28;
    pro1->_weight = 120;
    pro1->_height = 182;
    pro2->_name = @"李四";
    pro2->_sex = @"女";
    pro2->_age = 24;
    pro2->_weight = 90;
    pro2->_height = 168;
    [pro1 sayHello];
    [pro2 sayHello];
#endif
#if 0
    Nurse *nurse1 = [[Nurse alloc] init];
    Nurse *nurse2 = [[Nurse alloc] init];
    nurse1->_name = @"张三";
    nurse1->_sex = @"男";
    nurse1->_weight = 100;
    nurse1->_height = 178;
    nurse1->_age = 25;
    nurse2->_name = @"李四";
    nurse2->_sex = @"女";
    nurse2->_weight = 100;
    nurse2->_height = 168;
    nurse2->_age = 23;
    [nurse1 sayHello];
    [nurse2 sayHello];
#endif
#if 0
    Worker *worker1 = [[Worker alloc] init];
    Worker *worker2 = [[Worker alloc] init];
    worker1->_name = @"张三";
    worker1->_sex = @"男";
    worker1->_weight = 100;
    worker1->_height = 178;
    worker1->_age = 25;
    worker2->_name = @"李四";
    worker2->_sex = @"女";
    worker2->_weight = 100;
    worker2->_height = 168;
    worker2->_age = 23;
    [worker1 sayHello];
    [worker2 sayHello];
#endif
#if 0
    Musician *musician1 = [[Musician alloc] init];
    Musician *musician2 = [[Musician alloc] init];
    musician1->_name = @"张三";
    musician1->_sex = @"男";
    musician1->_weight = 100;
    musician1->_height = 178;
    musician1->_age = 25;
    musician2->_name = @"李四";
    musician2->_sex = @"女";
    musician2->_weight = 100;
    musician2->_height = 168;
    musician2->_age = 23;
    [musician1 sayHello];
    [musician2 sayHello];
#endif
#if 0
    Artist *art1 = [[Artist alloc] init];
    Artist *art2 = [[Artist alloc] init];
    art1->_name = @"张三";
    art1->_sex = @"男";
    art1->_age = 28;
    art1->_weight = 120;
    art1->_height = 182;
    art2->_name = @"李四";
    art2->_sex = @"女";
    art2->_age = 24;
    art2->_weight = 90;
    art2->_height = 168;
    [art1 sayHello];
    [art2 sayHello];
#endif
#if 0
    Writer *writer1 = [[Writer alloc] init];
    Writer *writer2 = [[Writer alloc] init];
    writer1->_name = @"张三";
    writer1->_sex = @"男";
    writer1->_age = 28;
    writer1->_weight = 120;
    writer1->_height = 182;
    writer2->_name = @"李四";
    writer2->_sex = @"女";
    writer2->_age = 24;
    writer2->_weight = 90;
    writer2->_height = 168;
    [writer1 sayHello];
    [writer2 sayHello];
#endif
#if 0
    Composer *com1 = [[Composer alloc] init];
    Composer *com2 = [[Composer alloc] init];
    com1->_name = @"张三";
    com1->_sex = @"男";
    com1->_weight = 100;
    com1->_height = 178;
    com1->_age = 25;
    com2->_name = @"李四";
    com2->_sex = @"女";
    com2->_weight = 100;
    com2->_height = 168;
    com2->_age = 23;
    [com1 sayHello];
    [com2 sayHello];
#endif
#if 0
    Actor *actor1 = [[Actor alloc] init];
    Actor *actor2 = [[Actor alloc] init];
    actor1->_name = @"张三";
    actor1->_sex = @"男";
    actor1->_weight = 100;
    actor1->_height = 178;
    actor1->_age = 25;
    actor2->_name = @"李四";
    actor2->_sex = @"女";
    actor2->_weight = 100;
    actor2->_height = 168;
    actor2->_age = 23;
    [actor1 sayHello];
    [actor2 sayHello];
#endif
#if 0
    Repairman *rep1 = [[Repairman alloc] init];
    Repairman *rep2 = [[Repairman alloc] init];
    rep1->_name = @"张三";
    rep1->_sex = @"男";
    rep1->_age = 28;
    rep1->_weight = 120;
    rep1->_height = 182;
    rep2->_name = @"李四";
    rep2->_sex = @"女";
    rep2->_age = 24;
    rep2->_weight = 90;
    rep2->_height = 168;
    [rep1 sayHello];
    [rep2 sayHello];
#endif
#if 0
    Attorney *att1 = [[Attorney alloc] init];
    Attorney *att2 = [[Attorney alloc] init];
    att1->_name = @"张三";
    att1->_sex = @"男";
    att1->_weight = 100;
    att1->_height = 178;
    att1->_age = 25;
    att2->_name = @"李四";
    att2->_sex = @"女";
    att2->_weight = 100;
    att2->_height = 168;
    att2->_age = 23;
    [att1 sayHello];
    [att2 sayHello];
#endif
#if 0
    Mathematician *math1 = [[Mathematician alloc] init];
    Mathematician *math2 = [[Mathematician alloc] init];
    math1->_name = @"张三";
    math1->_sex = @"男";
    math1->_weight = 100;
    math1->_height = 178;
    math1->_age = 25;
    math2->_name = @"李四";
    math2->_sex = @"女";
    math2->_weight = 100;
    math2->_height = 168;
    math2->_age = 23;
    [math1 sayHello];
    [math2 sayHello];
#endif
    Teacher *tea1 = [[Teacher alloc] init];
    Teacher *tea2 = [[Teacher alloc] init];
    tea1->_name = @"张三";
    tea1->_sex = @"男";
    tea1->_weight = 100;
    tea1->_height = 178;
    tea1->_age = 25;
    tea2->_name = @"李四";
    tea2->_sex = @"女";
    tea2->_weight = 100;
    tea2->_height = 168;
    tea2->_age = 23;
    [tea1 sayHi];
    [tea2 sayHi];
    [tea1 setName:@"lsj" sex:@"man" age:19 weight:130 height:180];
    [tea1 sayHi];
    [tea1 name];
    NSString *str = [tea1 name];
    NSLog(@"%@",str);
    
    return 0;
}
